<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>欢迎注册汽车租赁网ID</title>
<link type="text/css" rel="stylesheet" href="css/common.css">
<style type="text/css">
	body{
		background-image: url("images/backgroud.jpg");
		overflow: hidden;
	}
	.login-div{
		background: rgba(255, 255, 255, 0.9);
		width: 400px;
		box-sizing: border-box;
		margin: 0px auto;
		padding: 20px 40px;
	}
	.login-title{
		text-align: center;
		font-size: 22px;
	}
	.form-item{
		box-sizing: border-box;
		width: 100%;
		height: 35px;
		margin-top: 15px;
		padding: 0px 5px;
	}
</style>
</head>
<body>
	<div style="height: 240px;"></div>
	<div class="login-div">
		<div class="login-title">欢迎注册汽车租赁网</div>
		<br>
		<span style="color: red">
		<%
			String errorCode = request.getParameter("code");
			if (errorCode == null) {
				
			} else if (errorCode.equals("0000")) {
				out.print("注册成功，去登录吧！");
			} else if (errorCode.equals("0001")) {
				out.print("用户名已存在！");
			} else if (errorCode.equals("0002")) {
				out.print("两次密码输入不一致");
			} else if (errorCode.equals("1111")) {
				out.print("注册失败，请重试！");
			}
			
		%>
		</span>
		<form action="RegisterServlet" method="post">
			<input class="form-item" name="username" type="text" placeholder="用户名">
			<input class="form-item" name="password" type="password" placeholder="密码">
			<input class="form-item" name="password2" type="password" placeholder="确认密码">
			<input class="form-item" name="phone" type="text" placeholder="手机号">
			<button class="form-item">注册</button>
		</form>
		<br>
		<a href="login.jsp">已有账号？去登录</a>
	</div>
</body>
</html>